import allure
from core.keywords.playwright.dialog import DialogKeywords
from core.keywords.playwright.element import ElementKeywords
from core.keywords.playwright.page import PageKeywords
from core.keywords.playwright.file import FileKeywords
from core.keywords.playwright.request import RequestKeywords
from core.keywords.playwright.keyboard import KeyboardKeywords


class BasePage(
    DialogKeywords,
    ElementKeywords,
    PageKeywords,
    FileKeywords,
    RequestKeywords,
    KeyboardKeywords
):
    def __init__(self, page):
        self.page = page
        super().__init__(page)
        self.iframe = None


    def sleep(self, seconds):
        with allure.step(f"等待{seconds}s"):
            self.page.wait_for_timeout(seconds * 1000)  